import 'package:flutter/material.dart';
import 'package:search_people/utils/util.dart';
import 'package:search_people/value/topcolors.dart';

class PersonCell extends StatelessWidget {
  const PersonCell({
    Key? key,
    required this.idx,
  }) : super(key: key);
  final int idx;
  @override
  Widget build(BuildContext context) {
    return Container(
      height: 135.r,
      padding: EdgeInsets.fromLTRB(10.r, idx == 0 ? 10.r : 0, 10.r, 10.r),
      decoration: BoxDecoration(
          color: Colors.white,
          border: Border(
            left: BorderSide(color: TopColors.bg),
            right: BorderSide(color: TopColors.bg),
            top: idx == 0 ? BorderSide(color: TopColors.bg) : BorderSide.none,
            bottom:
                idx == 2 ? BorderSide(color: TopColors.bg) : BorderSide.none,
          )),
      child: Container(
        color: TopColors.bg,
        child: Row(
          children: [
            loadImage(
              width: 80.r,
              height: 120.r,
            ),
            SizedBox(
              width: 10.r,
            ),
            Expanded(
              child: Column(
                mainAxisAlignment: MainAxisAlignment.spaceAround,
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  Text(
                    '罗云峰',
                    style: TextStyle(
                      color: TopColors.black_33,
                      fontSize: 16.sp,
                      fontWeight: FontWeight.bold,
                    ),
                  ),
                  Text(
                    '职务：合肥市委副书记、市长',
                    style: TextStyle(
                      color: TopColors.black_66,
                      fontSize: 14.sp,
                      fontWeight: FontWeight.bold,
                    ),
                  ),
                  Flexible(
                    child: Text(
                      '本周关键词：疫情防控；金融；观创；信访；中医药；',
                      style: TextStyle(
                        color: TopColors.black_99,
                        fontSize: 12.sp,
                        fontWeight: FontWeight.bold,
                      ),
                    ),
                  ),
                ],
              ),
            ),
          ],
        ),
      ),
    );
  }
}
